Skip to main content

🤖 Execute review transaction workflow

Introduction​

This API allows users to send transaction information via a POST request, and n8n will automatically evaluate and rate the transaction. The API processes the content and returns an analysis based on the provided model.

Execute an invoice analytics​

Endpoint​

Use the following endpoint to submit the transaction for review:

POST https://n8n.japanyosan.com/execute/review-transaction

Headers​

The API requires the following headers:

  • X-N8N-API-KEY - Your n8n API key for authentication
  • Content-Type: application/json

Request Parameters​

The API expects the following parameters as a JSON payload:

  • model (string) - The AI model to use. Accepted values:
    • ollama
    • gpt-4o
    • gpt-4o-mini
    • gpt-4-turbo
    • gpt-3.5-turbo
    • gemini-1.5-pro
    • gemini-1.5-flash
    • claude-3-5-sonnet-latest
    • claude-3-5-haiku-latest
    • claude-3-opus-latest
  • prompt (string) - The specific prompt to provide for the invoice evaluation.
  • content (string) - The transaction text to be reviewed.
  • llmKey (string) - Your API key for the selected model. Not required when using the ollama model.

Example Request​

curl --location 'https://n8n.japanyosan.com/execute/review-transaction' \
--header 'X-N8N-API-KEY: ey*********' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-4o-mini",
"content": "...",
"llmKey": "sk-proj-ERa23*******",
"prompt": "..."
}'

For Ollama model requests, you can omit the llmKey:

curl --location 'https://n8n.japanyosan.com/execute/review-transaction' \
--header 'X-N8N-API-KEY: ey*********' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-4o-mini",
"content": "...",
"prompt": "..."
}'

Response​

The response body contains the following two keys:

  • response (string): The result of the transaction review, which provides the evaluation and rating of the submitted transaction.
  • execution_id (integer): A unique identifier for the specific execution of the transaction review workflow.
{
"response": ".....",
"execution_id": 778
}